package com.example.controller;



import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.entity.SysUser;
import com.example.service.SysUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;

/**
 * (SysUser)表控制层
 *
 * @author makejava
 * @since 2022-05-09 22:05:08
 */
@RestController
@RequestMapping("sysUser")
public class SysUserController {
    /**
     * 服务对象
     */
    @Resource
    private SysUserService sysUserService;

    /**
     * 分页查询所有数据
     *
     * @param page 分页对象
     * @param sysUser 查询实体
     * @return 所有数据
     */
    @GetMapping("/findAll")
    public Page<SysUser> selectAll(Page<SysUser> page, SysUser sysUser) {
        System.out.println("调用了查询方法");
        return null;
    }

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public SysUser selectOne(@PathVariable Serializable id) {
        return this.sysUserService.getById(id);
    }
}

